package com.yz.api.facade.order;

import com.yz.model.dto.order.OrderRequest;
import com.yz.model.dto.order.PayOrderRequest;
import com.yz.model.vo.order.OrderVo;
import com.yz.common.resp.BaseResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * <p>
 * User:Mr.Du
 * Date:2024/4/9
 * Time:10:17
 */
@Tag(name = "订单接口")
public interface OrderFacade {

    @Operation(summary = "返回订单信息")
    @Parameters(value = {@Parameter(name = "uid", description = "用户id", in = ParameterIn.HEADER)})
    @PostMapping("/order/info")
    BaseResponse<OrderVo> returnOrderInfo(@RequestHeader Long uid, @RequestBody OrderRequest orderRequest);

    @Operation(summary = "下单")
    @Parameters(value = {@Parameter(name = "uid", description = "用户id", in = ParameterIn.HEADER)})
    @PostMapping("/order/pay")
    BaseResponse<String> orderReCharge(@RequestHeader Long uid, @RequestBody PayOrderRequest payOrderRequest);
}
